﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using RapChieuPhim.Properties;
using DevExpress.XtraEditors;

namespace RapChieuPhim.GUI
{
    public partial class GiaTri : UserControl
    {
        public GiaTri()
        {
            InitializeComponent();
        }

        private void GiaTri_Load(object sender, EventArgs e)
        {
            txt2D.Value = int.Parse(Settings.Default.GiaTien2D);
            txt3D.Value = int.Parse(Settings.Default.GiaTien3D);
            txtGiaToi.Value = int.Parse(Settings.Default.GiaCaChieu);
        }

        private void btnCapNhap_Click(object sender, EventArgs e)
        {
            Settings.Default.GiaTien2D = txt2D.Value.ToString();
            Settings.Default.GiaTien2D = txt3D.Value.ToString();
            Settings.Default.GiaCaChieu = txtGiaToi.Value.ToString();
            Settings.Default.Save();
            XtraMessageBox.Show("Đã cập nhật xong", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            
        }
    }
}
